home *** CD-ROM | disk | FTP | other *** search
/ Champak 108 / jogo-disk-108.iso / Games / playing_with_fire.swf / scripts / frame_56 / PlaceObject2_279_100 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Text File  |  2010-05-15  |  976b  |  39 lines

  1. onClipEvent(enterFrame){
  2.    if(!_root.movGame.blnRoundOver)
  3.    {
  4.       myTime = new Date();
  5.       nTime = myTime.getTime() - nTimeLag;
  6.       strTime = new String(nTime);
  7.       nLen = strTime.length;
  8.       strSecs = strSecSubtract - Number(strTime.substring(0,nLen - 3));
  9.       if(strSecs < 0)
  10.       {
  11.          strSecSubtract += 60;
  12.          strMins--;
  13.       }
  14.       if(strSecs >= 60)
  15.       {
  16.          strAdd = 1;
  17.       }
  18.       else
  19.       {
  20.          strAdd = 0;
  21.       }
  22.       if(strSecs <= 0 || strSecs >= 60)
  23.       {
  24.          strSecs = "00";
  25.       }
  26.       if(strSecs > 0 && strSecs < 10)
  27.       {
  28.          strSecs = "0" + String(strSecs);
  29.       }
  30.       txtTime = Number(strMins + strAdd) + ":" + strSecs;
  31.       if(strMins + strAdd < 0 && strSecs == 0)
  32.       {
  33.          _root.movGame.blnRoundOver = 1;
  34.       }
  35.       nFrame = Number(_root.movTime.strMins) * 60 + Number(_root.movTime.strSecs);
  36.       movBar.gotoAndStop(120 - nFrame);
  37.    }
  38. }
  39.